<div class="temporadas index">
	<h2><?php __('Temporadas');?></h2>

<div class="actions">
	<ul>
		<li><?php echo $this->Html->link(__('Nova Temporada', true), array('action' => 'add')); ?></li>
	</ul>
</div>

<div class="total">
<?php
	echo $this->Paginator->counter(array(
	'format' => __('Página %page% de %pages%, num total de %count% registros', true)
	));
	?></div>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('ID', 'id_temporadas');?></th>
			<th><?php echo $this->Paginator->sort('series_id');?></th>
			<th><?php echo $this->Paginator->sort('Episódios','numero_episodios');?></th>
			<th><?php echo $this->Paginator->sort('Temporada','numero_temporada');?></th>
			<th><?php echo $this->Paginator->sort('estados_id');?></th>
			<th><?php echo $this->Paginator->sort('lugares_id');?></th>
			<th class="actions"><?php __('Opções');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($temporadas as $temporada):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $temporada['Temporada']['id_temporadas']; ?>&nbsp;</td>
		<td><?php echo $temporada['Series']['nome']; ?></td>
		<td><?php echo $temporada['Temporada']['numero_episodios']; ?>&nbsp;</td>
		<td><?php echo $temporada['Temporada']['numero_temporada']; ?>&nbsp;</td>
		<td><?php echo $temporada['Estados']['estados']; ?></td>
		<td><?php echo $temporada['Lugares']['lugares']; ?></td>
		<td class="actions">
			<?php echo $this->Html->image('view.png', array('alt'=>'Ver', 'title'=>'Ver', 'url'=> array('action' => 'view', $temporada['Temporada']['id_temporadas']))); ?>
			<?php echo $this->Html->image('edit.png', array('alt'=>'Editar', 'title'=>'Editar', 'url'=> array('action' => 'edit', $temporada['Temporada']['id_temporadas']))); ?>
			<?php echo $this->Html->link($this->Html->image('trash.png', array('alt'=>'Apagar', 'title'=>
'Apagar')), array('action' => 'delete', $temporada['Temporada']['id_temporadas']), array('escape'=>false), sprintf(__('Deseja apagar o registro %s?', true), $temporada['Temporada']['id_temporadas'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Próximo', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
